Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rnn_search_model #729

Open
wants to merge 3 commits into
base: dev-static
Choose a base branch
from

Conversation

peterzhang2029
Copy link
Contributor

resolve #728

@lcy-seso
Copy link
Collaborator

@peterzhang2029 I hope to know whether the multi-threaded/multi-card training can correctly work for RNN search model? Thank you.

@peterzhang2029
Copy link
Contributor Author

@lcy-seso 目前在多线程上面测试是可以work的,在多卡上面现在用的机器环境会有显存的问题,需要再验证一下。

@lcy-seso
Copy link
Collaborator

好的~ 感谢。

Copy link
Collaborator

@lcy-seso lcy-seso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some small modifications.

@@ -0,0 +1,25 @@
source_dict_dim = 10000
target_dict_dim = 10000

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move line 1 ~ 2 into ModelConfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

target_dict_dim = model_conf.target_dict_dim
is_generating = model_conf.is_generating
beam_size = model_conf.beam_size
max_length = model_conf.max_length
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 34 ~ 41, pass these configurations as function parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

paddle.reader.shuffle(
paddle.dataset.wmt16.train(train_conf.source_dict_dim,
train_conf.target_dict_dim),
buf_size=1000),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make buf_size larger, for example, 100000.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

paddle.reader.shuffle(
paddle.dataset.wmt16.test(train_conf.source_dict_dim,
train_conf.target_dict_dim),
buf_size=1000),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make buf_size larger, for example, 100000.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RNN Search Model for neural machine translation.
3 participants